package hu.bme.mit.androtext.generator;

import hu.bme.mit.androtext.age.age.AndroidApplication;

import java.util.List;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xpand2.output.Output;

/**
 * Application generator for androLang language.
 * 
 * @author Mark Czotter
 * 
 */
public interface IAppGenerator {

	public static final String FN_SRC_GEN = "src-gen";
	public static final String FILE_ENCODING = "Cp1250";

	/**
	 * Generates the application.
	 * 
	 * @param monitor
	 * @throws AppGenerationException
	 * @throws CoreException
	 */
	public void generate(IProgressMonitor monitor)
			throws AppGenerationException, Exception;
	
	public IFile getSource();
	
	public AndroidApplication getAndroidApplication();

	public String getProjectName();
	
	public IProject getProject();
	public void setProject(IProject project);

	public String getLocationRoot();
	
	public IProjectDescription getProjectDescription();

	public void unload();

	public List<String> getAllPackageNames();
	
	public Output getOutput();
	
	public IProject getModelProject();
	
	public EObject getResourceRoot(IFile source) throws AppGenerationException;

}
